import request from '@/utils/request';
import { praseStrEmpty } from "@/utils/ruoyi";

// 新增钱包
export function saveWallet(data) {
  return request({
    url: '/trade/wallet/save',
    method: 'post',
    data: data
  })
}

// 删除钱包
export function removeWallet(ids) {
  return request({
    url: '/trade/wallet/remove/' + ids,
    method: 'delete'
  })
}

// 修改钱包
export function updateWallet(data) {
  return request({
    url: '/trade/wallet/update',
    method: 'put',
    data: data
  })
}

// 查询钱包详细
export function getWallet(walletId) {
  return request({
    url: '/trade/wallet/' + praseStrEmpty(walletId),
    method: 'get'
  })
}

// 查询钱包列表
export function searchWallet(query) {
  return request({
    url: '/trade/wallet/search',
    method: 'get',
    params: query
  })
}